﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace WpfCardGame.Converters
{
    public class SuitToBackgroundConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string RV = "";
            if (value != null && value is string)
            {
                if ((string)value =="h") RV = "Red";
                else if ((string)value == "c") RV = "Green";
                else if ((string)value == "d") RV = "Blue";
                else if ((string)value == "s") RV = "Yellow";
            }

            return RV;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return Convert(value, targetType, parameter, culture);
        }
    }
}
